Computer systems typically include a processor and a memory that stores programs that are executable by the processor. A program that is executable by a processor consists of instructions from the “instruction set architecture” associated with the processor. The instruction set architecture defines the instructions that are supported by a processor. The instruction set architecture for a family of processors typically remains fairly stable over time. As a result, programs that are written for one processor from a family are usually compatible with other processors from the family.
The desire for compatibility between programs and processors of the same family can create constraints on innovations for a processor family. To add a new instruction to an instruction set architecture, for example, steps need to be taken to ensure that previous versions of processors from a family of processors can correctly handle the new instruction. Unfortunately, such steps may be difficult to implement and may result in a heavy performance penalty for the previous versions of the processors. The difficulty and performance penalty can be so large as to make adding a new instruction to the instruction set architecture infeasible.
One approach that has been employed in prior-art systems is to add a new instruction using an instruction encoding which is reserved on older processors, meaning that older processors trigger an interruption when an attempt is made to execute the instruction encoding. Software, then, in the interruption handler can be provided to emulate the function of the new instruction on older processors that do not support it. However, the performance penalty of interrupting the processor and executing the code to emulate the new instruction is typically quite high—on the order of 10's to 100's of cycles at best.
It would be desirable to be able to add new instructions to an instruction set architecture of a family of processors while maintaining compatibility with previous versions of processors from the family and while providing for good performance on both old and new processors.